package com.xysd.express.activity.mine.account;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.xysd.express.R;
import com.xysd.express.base.BaseActivity;
import com.xysd.express.bean.User;
import com.xysd.express.util.ToastUtil;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

@ContentView(R.layout.activity_account)
public class AccountActivity extends BaseActivity implements View.OnClickListener {

    @ViewInject(R.id.balance_tv)
    private TextView balance_tv;
    @ViewInject(R.id.recharge_layout)
    private LinearLayout recharge_layout;
    @ViewInject(R.id.details_layout)
    private LinearLayout details_layout;
    @Override
    protected void init() {
        setTitleBar("账户管理");
        recharge_layout.setOnClickListener(this);
        details_layout.setOnClickListener(this);
        balance_tv.setText(User.getInstance().Capital+"");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.recharge_layout:
                ToastUtil.show("升级中");
                break;
            case R.id.details_layout:
                startAty(AccountDetailsActivity.class);
                break;
        }
    }
}
